package chapter_5.area;

public class Rectangle extends Shape{
    double width;
    double height;
    public Rectangle() {
    }
    public Rectangle(String shapeName,double width, double height) {
        super(shapeName);
        this.width = width;
        this.height = height;
    }
    @Override
    public double area() {
        System.out.println(shapeName+"面积="+width*height);
        return width * height;
    }
}
